package com.example.warehouse_manager.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
* 角色表
* @TableName role
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Role implements Serializable {


    @NotNull(message="[]不能为空")
    private Integer roleId;

    @Size(max= 100,message="编码长度不能超过100")
    @Length(max= 100,message="编码长度不能超过100")
    private String roleName;

    @Size(max= 300,message="编码长度不能超过300")
    @Length(max= 300,message="编码长度不能超过300")
    private String roleDesc;

    @Size(max= 100,message="编码长度不能超过100")
    @Length(max= 100,message="编码长度不能超过100")
    private String roleCode;

    private String roleState;

    private Integer createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private Integer updateBy;

    private Date updateTime;

    //追加属性
    private String getCode;//角色创建人


}
